/**
 * @projectName: com.xiayuanxing.designPattern
 * @className: TVOffCommand
 * @author: xiayuanxing
 * @description: TODO
 * @date: 2022/1/5 9:22
 * @version: 1.0
 */
public class TVOffCommand implements Command{


    /** 聚合TVReceiver */
    TVReceiver tvReceiver;

    /** 构造器 */
    public TVOffCommand(TVReceiver tvReceiver) {
        super();
        this.tvReceiver = tvReceiver;
    }

    public void execute() {
        tvReceiver.off();
    }

    public void undo() {
        tvReceiver.on();
    }
}
